package com.bingxue.edu.management.education.model.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.time.LocalTime;

import static com.bingxue.edu.common.constant.DateConstants.FORMAT_TIME_HHmm;


@Data
@Schema(description = "创建上课时间段信息")
public class TimeTemplateReq {

    @NotNull(message = "名称不能为空")
    @Length(max=32, message="名称长度应小于32")
    private String name;


    @NotNull(message = "开始时间不能为空")
    @JsonFormat(pattern = FORMAT_TIME_HHmm)
    private LocalTime startTime;


    @NotNull(message = "结束时间不能为空")
    @JsonFormat(pattern = FORMAT_TIME_HHmm)
    private LocalTime endTime;

}
